﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Microsoft.Reporting.WinForms;
using MyHotel.MyHotel_MHBaoCaoDoanhThu_BUS_Webservice;


namespace MyHotel.Reports
{
    public partial class frmReviewBaoCaoDoanhThu : Form
    {
        private int thang;
        private List<ChiTietDoanhThuReport> dataSource;
        public frmReviewBaoCaoDoanhThu(int _thang, List<ChiTietDoanhThuReport> _dataSource)
        {
            InitializeComponent();
            thang = _thang;
            dataSource = _dataSource;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            try
            {
                List<ReportParameter> param = new List<ReportParameter>();
                param.Add(new ReportParameter("Thang", thang.ToString()));
                reportViewer1.LocalReport.SetParameters(param);
                BaoCaoDoanhThuBindingSource.DataSource = dataSource; 
                this.reportViewer1.RefreshReport();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
           
        }
    }
}
